import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import axios from "./utils/http";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "@/assets/equipmentIcon/iconfont.css";
Vue.config.productionTip = false;
Vue.prototype.$axios = axios;
Vue.directive("has", {
  inserted(el, bindings, vnode) {
    // console.log(1111, bindings);
    let btnPower = bindings.value;
    // console.log("btnPower", btnPower);
    let boolean = vnode.context.$store.state.buttonPower[btnPower];
    !boolean && el.parentNode.removeChild(el);
  },
});
Vue.use(ElementUI);
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
